import { createRouter, createWebHistory } from 'vue-router';
const routes = [
    {
      path: '/',
      name: 'Home',
      component: () => import('../view/home/index.vue')
    },
    {
      path: '/About',
      name: 'About',
      component: () => import('../view/about/index.vue')
    },
    {
      path: '/Login',
      name: 'Login',
      component: () => import('../view/login/login.vue')
    },
    {
      path: '/Register',
      name: 'Register',
      component: () => import('../view/login/register.vue')
    },
  ];
  const router = createRouter({
    history: createWebHistory(), // 使用HTML5 History模式
    routes, // 短捷方式，等同于routes: routes
  });
  export default router;
